package com.linq.cool.beauty.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.linq.cool.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @Author: yqlin
 * @Date: 2021/2/5 13:49
 * @Description: 美容项目产品分类
 * @Version: 1.0.0
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "beauty_product_category")
public class BeautyProductCategory extends BaseEntity {
    /**
     * 分类Id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 图标
     */
    @NotBlank(message = "图标不能为空")
    @TableField(value = "icon")
    private String icon;

    /**
     * 父级id(0代表顶级分类)
     */
    @NotNull(message = "上级分类不能为空")
    @TableField(value = "parent_id")
    private Long parentId;

    /**
     * 分类名称
     */
    @NotBlank(message = "分类名称不能为空")
    @TableField(value = "`name`")
    private String name;

    /**
     * 分类级别(1级,2级,3级)
     */
    @NotNull(message = "分类级别不能为空")
    @TableField(value = "`level`")
    private Integer level;

    /**
     * 是否显示在导航栏(0否 1是)
     */
    @NotNull(message = "导航栏显示状态不能为空")
    @TableField(value = "nav_status")
    private Integer navStatus;

    /**
     * 排序
     */
    @NotNull(message = "排序不能为空")
    @TableField(value = "sort")
    private Integer sort;
}